/*    */ package com.feeyin.radar.sys.controller;
/*    */ 
/*    */ import com.feeyin.radar.sys.form.AssessmentTypeForm;
/*    */ import com.feeyin.radar.sys.service.AssessmentTypeService;
/*    */ import com.feeyin.radar.sys.service.RoleService;
/*    */ import com.feeyin.radar.sys.service.UserService;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.springframework.web.servlet.ModelAndView;
/*    */ import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
/*    */ import org.springframework.web.servlet.view.RedirectView;
/*    */ 
/*    */ public class AssessmentTypeController extends MultiActionController
/*    */ {
/*    */   private AssessmentTypeService assessmentTypeService;
/*    */   private RoleService roleService;
/*    */   private UserService userService;
/*    */   private String assessmentType;
/*    */ 
/*    */   public AssessmentTypeService getAssessmentTypeService()
/*    */   {
/* 32 */     return this.assessmentTypeService;
/*    */   }
/*    */ 
/*    */   public void setAssessmentTypeService(AssessmentTypeService assessmentTypeService) {
/* 36 */     this.assessmentTypeService = assessmentTypeService;
/*    */   }
/*    */ 
/*    */   public RoleService getRoleService() {
/* 40 */     return this.roleService;
/*    */   }
/*    */ 
/*    */   public void setRoleService(RoleService roleService) {
/* 44 */     this.roleService = roleService;
/*    */   }
/*    */ 
/*    */   public UserService getUserService() {
/* 48 */     return this.userService;
/*    */   }
/*    */ 
/*    */   public void setUserService(UserService userService) {
/* 52 */     this.userService = userService;
/*    */   }
/*    */ 
/*    */   public String getAssessmentType() {
/* 56 */     return this.assessmentType;
/*    */   }
/*    */ 
/*    */   public void setAssessmentType(String assessmentType) {
/* 60 */     this.assessmentType = assessmentType;
/*    */   }
/*    */ 
/*    */   public ModelAndView display(HttpServletRequest request, HttpServletResponse response)
/*    */   {
/* 65 */     Map map = new HashMap();
/* 66 */     map.put("result", request.getParameter("result"));
/* 67 */     map.put("targets", this.assessmentTypeService.getAssessmentTypesTarget());
/* 68 */     map.put("maxLimits", this.assessmentTypeService.getAssessmentTypesMaxLimit());
/* 69 */     map.put("roles", this.roleService.getRoles());
/* 70 */     map.put("users", this.userService.getActivityUsers());
/*    */ 
/* 72 */     return new ModelAndView(getAssessmentType(), map);
/*    */   }
/*    */ 
/*    */   public ModelAndView submitSettings(HttpServletRequest request, HttpServletResponse response, AssessmentTypeForm asTypeForm)
/*    */   {
/* 77 */     boolean result = false;
/* 78 */     int success = 0;
/* 79 */     if (asTypeForm != null) {
/* 80 */       result = this.assessmentTypeService.updateAssessemntType(asTypeForm);
/* 81 */       if (result) success = 1;
/*    */     }
/* 83 */     return new ModelAndView(new RedirectView("./assessmentType.do?action=display&result=" + success));
/*    */   }
/*    */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.controller.AssessmentTypeController
 * JD-Core Version:    0.6.0
 */